.widget-box
  .widget-header
    h4.widget-title =I18n.t('activerecord.models.<%= singular_table_name.downcase %>')
    span.widget-toolbar
      a.btn.btn-primary.btn-xs href=new_<%= prefixed_plain_model_url %>_path
        i.ace-icon.fa.fa-pencil-square-o
        |新增#{I18n.t('activerecord.models.<%= human_name.downcase %>') }
  .widget-body
    table.table
      thead
        tr
    <% attributes.each do |attribute| -%>
          th =I18n.t('activerecord.attributes.<%= human_name.downcase %>.<%= attribute.human_name.downcase %>')
    <% end -%>
          th
          th
          th

      tbody
        - @<%= plural_table_name %>.each do |<%= singular_table_name %>|
          tr
    <% attributes.each do |attribute| -%>
            td = <%= singular_table_name %>.<%= attribute.name %>
    <% end -%>
            td = link_to '查看', <%= "[:#{prefix},#{singular_table_name}]" %>
            td = link_to '编辑', edit_<%= prefixed_plain_model_url %>_path(<%= singular_table_name %>)
            td = link_to '删除', <%="[:#{prefix},#{singular_table_name}]" %>, data: {:confirm => '确定要删除吗?'}, :method => :delete
